package com.wy.dto;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.wy.entity.GoodsImage;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @Author:王渝
 * @Date: 2022/12/6  9:40
 * @Version 1.0
 */
@Data
public class GoodsInfoDto implements Serializable {

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 需缴纳保证金金额
     */
    private BigDecimal deposit;

    /**
     * 商品描述
     */
    private String description;



    /**
     * 起拍价
     */
    private BigDecimal startingPrice;



    /**
     * 开始时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startingTime;

    /**
     * 结束时间
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    /**
     * 加价幅度
     */
    private BigDecimal priceMarkup;


    /**
     * 类别名称
     */
    private String typeName;


    /**
     * 用户名称
     */
    private String userName;


    /**
     * 手机号
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 违约次数 默认值0
     */
    private Integer breakCount;

    /**
     * 商品图片
     */
    List<String> images;

    /**
     * 出价次数
     */
    private Integer count;

    /**
     * 当前最高价
     */
    private BigDecimal maxAmount;

    /**
     * 买方用户id
     */
    private  Long buyerUserId;

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 商品id
     */
    private Long goodsId;

    /**
     * 参与竞价价格
     */
    private BigDecimal bidAmount;

    private static final long serialVersionUID = 1L;
}
